#include "menudialog.h"
#include "ui_menudialog.h"
#include "settings.h"
#include "window.h"


MenuDialog::MenuDialog(QWidget *parent) :
    QWidget(parent),
    ui_(new Ui::MenuDialog)
{
    ui_->setupUi(this);
	connect(ui_->endButton, SIGNAL(clicked()), this, SIGNAL(closeGame()));
	connect(ui_->instructionButton, SIGNAL(clicked()), this, SIGNAL(showInstruction()));
	connect(ui_->newGameButton, SIGNAL(clicked()), this, SIGNAL(startGame()));
	connect(ui_->settingsButton, SIGNAL(clicked()), this, SLOT(showSettings()));
}

MenuDialog::~MenuDialog()
{
    delete ui_;
}

void MenuDialog::showSettings() {
	Settings *settings_ = new Settings(this);
	settings_->show();
}
